package com.example.ormsqlsplicingframe1.utlis;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@ApiModel("分页工具")
@Data
public class Page<E> implements Serializable {

    /** 总记录数 */
    @ApiModelProperty("总记录数")
    private Integer total;

    /** 列表数据 */
    @ApiModelProperty("列表数据")
    private List<E> list;

    /** 消息状态码 */
    @ApiModelProperty(value = "消息状态码 200为成功",example = "200")
    private Integer code;

    /** 消息内容 */
    @ApiModelProperty(value = "消息内容",example = "操作成功")
    private String msg;



    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Page() {
        this.setCode(200);
        this.setMsg("查询成功");
    }
}
